<template>
  <NavBack title="商品列表"></NavBack>
  <van-card v-for="item in goodlist" :key="item.proid"
    :price="item.originprice"
    :desc="item.category"
    :title="item.proname"
    :thumb="item.img2"
    @click="goDetal(item.proid)"
  />
</template>

<script>
import NavBack from "../../components/NavBack.vue";
export default {
  components: {
    NavBack,
  },
  data() {
    return {
      tabulation: this.$route.query.category,
      classification: this.$route.query.brand,
      goodlist: [],
    };
  },
  created() {
    this.$http({
      url: "/pro/categorybrandprolist",
      params: {
        count: 1,
        limitNum: 10,
        category: this.tabulation,
        brand: this.classification,
      },
    }).then((res) => {
      if (res.data.code === "200") {
        this.goodlist = res.data.data;
        console.log(res.data.data);
      }
    });
  },
  methods:{
    goDetal(a){
      this.$router.push('./gooddetail/'+ a)
    }
  }
};
</script>

<style scoped>
/deep/.van-card__price-integer{
  color: red;
}
/deep/.van-card__price-currency{
  color: red;
}
</style>